package com.shop.controller;

import com.shop.pojo.CommonResult;
import com.shop.pojo.MenuTemplate;
import com.shop.service.IMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class MenuController {
    @Resource
    private IMenuService menuService;

    @GetMapping("/menus")
    public CommonResult<List<MenuTemplate>> menus() {
        return menuService.getMenus();
    }
}
